<!--file upload-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Static/Admin/css/bootstrap-fileupload.min.css" />
<!--body wrapper start-->
<div class="wrapper">
<div class="row">
    <div class="col-lg-12">
        <section class="panel">
            <header class="panel-heading">
            	修改广告
            </header>
            <div class="panel-body">
                <div class="form">
                    <form class="cmxform form-horizontal adminex-form" id="signupForm" enctype="multipart/form-data" method="post" action="{:U('Advertisement/adEdit')}">
                        <div class="form-group ">
                            <label for="name" class="control-label col-lg-2">广告标题</label>
                            <div class="col-lg-10">
                                <input class="form-control " value="{$list.name}" id="name" name="name" type="text" />
                            </div>
                        </div>
                        <div class="form-group ">
                            <label for="firstname" class="control-label col-lg-2">广告位</label>
                            <div class="col-lg-10">
                                <select class="form-control m-bot15" name="l_id">
                                <volist name="list2" id="vo">
                                <option value="{$vo.id}" <eq name="vo.id" value="$list.l_id"> selected="selected" </eq>>{$vo.name}</option>
                                </volist>
                            	</select>
                            </div>
                        </div>
                        <div class="form-group ">
                            <label for="author" class="control-label col-lg-2">链接地址</label>
                            <div class="col-lg-10">
                                <input class="form-control " value="{$list.url}" id="url" name="url" type="text" />
                            </div>
                        </div>
                        <div class="form-group ">
                            <label for="author" class="control-label col-lg-2">开始显示时间</label>
                            <div class="col-lg-10">
                                <input class="form-control " value="{$list.begin_time}" id="startdate" name="begin_time" type="text" />
                            </div>
                        </div>
                        <div class="form-group ">
                            <label for="author" class="control-label col-lg-2">结束显示时间</label>
                            <div class="col-lg-10">
                                <input class="form-control " value="{$list.end_time}" id="enddate" name="end_time" type="text" />
                            </div>
                        </div>
                       
                        <div class="form-group last">
								<label class="control-label col-lg-2" for="legal_id_img">广告图片</label>
								<div class="col-md-9">
									<div class="fileupload fileupload-new" data-provides="fileupload">
										<div class="fileupload-new thumbnail" style="width: 200px; height: 150px;">
											<img src="{$list.img}" alt="" />
										</div>
										<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div>
										<div>
											<span class="btn btn-default btn-file"> 
												<span class="fileupload-new"><i class="fa fa-paper-clip"></i>选择图片</span>
												<span class="fileupload-exists"><i class="fa fa-undo"></i>换一张</span>
												<input type="file" name="img" class="default" />
											</span>
											<a href="#" class="btn btn-danger fileupload-exists" data-dismiss="fileupload">
												<i class="fa fa-trash"></i>删除
											</a>
										</div>
									</div>
								</div>
						</div>
                        <div class="form-group ">
                            <label for="author" class="control-label col-lg-2">排序</label>
                            <div class="col-lg-10">
                                <input class="form-control " value="{$list.sort}" id="sort" name="sort" type="text" />
                            </div>
                        </div>
                        <div class="form-group ">
                            <label for="firstname" class="control-label col-lg-2">是否显示</label>
                            <div class="col-lg-10">
                                <select class="form-control m-bot15" name="is_show">
                                <option value="1" <eq name="list.is_show" value="1"> selected="selected"</eq>>显示</option>
                                <option value="2" <eq name="list.is_show" value="2"> selected="selected"</eq>>不显示</option>
                            	</select>
                            </div>
                        </div>
						

						<div class="form-group">
                           <div class="col-lg-offset-2 col-lg-10">
                            <input type="hidden" name="id" value="{$list.id}" />
                            <input type="hidden" name="submit" value="submit" />
                            <button class="btn btn-primary" type="submit">保存</button>
                           </div>
                        </div>
                    </form>
                </div>
            </div>
        </section>
    </div>
</div>
</div>
<!--body wrapper end-->
<!--file upload-->
<script type="text/javascript" src="__PUBLIC__/Static/Admin/js/bootstrap-fileupload.min.js"></script>
<!--pickers css-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Static/Admin/js/bootstrap-datepicker/css/datepicker-custom.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Static/Admin/js/bootstrap-timepicker/css/timepicker.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Static/Admin/js/bootstrap-colorpicker/css/colorpicker.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Static/Admin/js/bootstrap-daterangepicker/daterangepicker-bs3.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Static/Admin/js/bootstrap-datetimepicker/css/datetimepicker-custom.css" />
<script type="text/javascript" src="__PUBLIC__/Static/Admin/js/bootstrap-daterangepicker/moment.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Static/Admin/js/bootstrap-daterangepicker/daterangepicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/Static/Admin/js/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/Static/Admin/js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Static/Admin/js/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script>
	
$("#startdate").datetimepicker({
	format: 'yyyy-mm-dd',
	language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
	autoclose: 1,
	todayHighlight: 1,
	startView: 2,
	minView: 2,
	forceParse: 0
});
$("#enddate").datetimepicker({
	format: 'yyyy-mm-dd',
	language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
	autoclose: 1,
	todayHighlight: 1,
	startView: 2,
	minView: 2,
	forceParse: 0
});

</script>